"""
    1. 操作谷歌浏览器驱动下载地址
        http://chromedriver.storage.googleapis.com/index.html
    2. 谷歌驱动和谷歌浏览器版本之间的映射表
        http://blog.csdn.net/huilan_same/article/details/51896672
    3. 查看谷歌浏览器版本
        谷歌浏览器右上角-->帮助-->关于
    4. 执行命令
        pip install selenium
"""

import urllib.request
from time import sleep

from lxml import etree

url = 'https://www.bg3.co/novel/pagea/shenhuabansanguo-fentuhuangcao_6859.html'

headers = {}

response = urllib.request.urlopen(url)
html = response.read().decode('utf-8')
tree = etree.HTML(html)
text = tree.xpath("//div[@class='content']/p/text()")
for content in text:
    # sleep(1000)
    print(content.strip())
